package com.spring.aop;

import java.lang.reflect.Method;

/**
 * @author SpringWang
 * @date 2021/6/2
 */
public class Advice {
    // 通知对象
    private final Object aspect;
    // 通知方法
    private final Method adviceMethod;
    // 拦截指定异常名
    private String throwingName;


    public Advice(Object aspect, Method adviceMethod) {
        this.aspect = aspect;
        this.adviceMethod = adviceMethod;
    }

    public Object getAspect() {
        return aspect;
    }

    public Method getAdviceMethod() {
        return adviceMethod;
    }

    public void setThrowingName(String throwingName) {
        this.throwingName = throwingName;
    }

    public String getThrowingName() {
        return throwingName;
    }
}
